.chatbox-container {
    height: 100vh;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.chatbox-header {
    background: rgba(0, 0, 0, 0.2);
    padding: 16px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.chatbox-main {
    flex: 1;
    display: flex;
    min-height: 0;
}

.chatbox-sidebar {
    width: 350px;
    background: rgba(255, 255, 255, 0.95);
    border-right: 1px solid #e8e8e8;
    overflow-y: auto;
    backdrop-filter: blur(10px);
}

.chatbox-sidebar .ant-collapse {
    background: transparent;
}

.chatbox-sidebar .ant-collapse-item {
    border-bottom: 1px solid #f0f0f0;
}

.chatbox-sidebar .ant-collapse-header {
    padding: 16px !important;
    font-weight: 500;
}

.chatbox-sidebar .ant-collapse-content-box {
    padding: 16px;
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #ff4d4f;
    transition: background-color 0.3s;
}

.status-dot.connected {
    background-color: #52c41a;
}

.json-editor {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 12px;
    line-height: 1.4;
}

.chatbox-chat-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
}

.chatbox-messages {
    flex: 1;
    padding: 16px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.message-item {
    padding: 12px 16px;
    border-radius: 8px;
    border-left: 4px solid #d9d9d9;
    background: #fafafa;
    transition: all 0.3s;
}

.message-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.message-system {
    border-left-color: #1890ff;
    background: #e6f7ff;
}

.message-user {
    border-left-color: #52c41a;
    background: #f6ffed;
    margin-left: 20%;
}

.message-tool {
    border-left-color: #722ed1;
    background: #f9f0ff;
}

.message-error {
    border-left-color: #ff4d4f;
    background: #fff2f0;
}

.message-header {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.message-content {
    font-size: 14px;
    line-height: 1.5;
}

.message-content pre {
    background: rgba(0, 0, 0, 0.05);
    padding: 8px;
    border-radius: 4px;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 12px;
    overflow-x: auto;
}

.chatbox-input {
    padding: 16px;
    border-top: 1px solid #e8e8e8;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .chatbox-sidebar {
        width: 280px;
    }
    
    .message-user {
        margin-left: 10%;
    }
}

@media (max-width: 576px) {
    .chatbox-main {
        flex-direction: column;
    }
    
    .chatbox-sidebar {
        width: 100%;
        height: 300px;
        border-right: none;
        border-bottom: 1px solid #e8e8e8;
    }
    
    .message-user {
        margin-left: 0;
    }
}

/* 滚动条样式 */
.chatbox-sidebar::-webkit-scrollbar,
.chatbox-messages::-webkit-scrollbar {
    width: 6px;
}

.chatbox-sidebar::-webkit-scrollbar-track,
.chatbox-messages::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 3px;
}

.chatbox-sidebar::-webkit-scrollbar-thumb,
.chatbox-messages::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.3);
    border-radius: 3px;
}

.chatbox-sidebar::-webkit-scrollbar-thumb:hover,
.chatbox-messages::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.5);
}

/* 动画效果 */
.message-item {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Ant Design 组件自定义样式 */
.chatbox-container .ant-card {
    transition: all 0.3s;
}

.chatbox-container .ant-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.chatbox-container .ant-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.chatbox-container .ant-btn-primary:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.chatbox-container .ant-input:focus,
.chatbox-container .ant-input-focused {
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

.chatbox-container .ant-select:not(.ant-select-disabled):hover .ant-select-selector {
    border-color: #667eea;
}

.chatbox-container .ant-select-focused .ant-select-selector {
    border-color: #667eea !important;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2) !important;
}